package com.javaee.mapper.user;

import com.javaee.entity.Doctor;
import com.javaee.entity.Mzgh;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface AppointmentRepository {

//    List<Doctor> queryAllDoctor(@Param("startIndex") int startIndex, @Param("perPageSize") int perPageSize);
    List<Doctor> queryAllDoctor();
    public List<Doctor> search(@Param("mykey") String mykey,@Param("weekday") String weekday);
    public List<Doctor> searchfromall(String mykey);
    public int selectCountDoctor();
    public  int selectCount(int Uid);
    public  List<Map<String, Object>> selectMyMzghByPage(@Param("startIndex") int startIndex, @Param("perPageSize") int perPageSize, @Param("Uid") int Uid);
    public int deleteMzgh(int id);
    public int updatePlan(@Param("dId") int dId,@Param("weekday") String weekday);

    public Doctor findDoctorById(int dId);
    public int updateMyBalance(int Uid, double fee);
   public int selectCountByday(String day);
   public List<Doctor> findDoctorByPage(@Param("startIndex")int startIndex,@Param("perPageSize") int perPageSize,@Param("weekday") String weekday);
   public int updatePlanReduce(@Param("dId") int dId,@Param("weekday")String weekday);
   public int ReduceMyBalance(int Uid, double fee);
    public int insertMzgh(Mzgh mzgh);
    public Mzgh findMzghById(int id);
}
